This notebook is designed to work with output from the Mass Balance workflow [iceflow] developed during Geohackweek2016 at the University of Washington (https://github.com/dshean/iceflow).
In [1]:
%matplotlib inline
import os
import matplotlib.pyplot as plt
# The two statements below are used mainly to set up a plotting
# default style that's better than the default from matplotlib
#import seaborn as sns
plt.style.use('bmh')
from shapely.geometry import Point
#import pandas as pd
import geopandas as gpd
from geopandas import GeoSeries, GeoDataFrame
In [2]:
file_pth = 'rgi_centralasia/13_rgi32_CentralAsia.shp'
rgi_glac = gpd.read_file(file_pth)
timeframe='[time between DEMs]'
rgi_glac.head()
Out[2]:
In [ ]:
# test data set-up
gdf = rgi_glac
gdf.plot()
In [ ]:
# test data set-up
import random
my_randoms = random.sample(xrange(-50,50), 15)
gdf["spec"]= my_randoms
gdf.to_file("rgi_test.shp")
In [ ]:
f, ax = plt.subplots(1, figsize=(6, 4))
rgi_glac.plot(column='[spec mb]', scheme='fisher_jenks', k=7,
alpha=0.9, cmap=plt.cm.Blues, legend=True, ax=ax)
plt.axis('equal')
ax.set_title('Specific Mass Balance'+timeframe)